Repository navigation
derive(Debug) for Expr - #6708
Conversation
|
So I had a quick look at the outputs: I think the changes to the sqllogictests (e.g. |
Ok
Case 2 I find the reason. I will update right now. |
| let expected = | ||
| "Projection: a IN ([CAST(Int32(1) AS Int64), CAST(Int8(4) AS Int64), Int64(8)]) AS a IN (Map { iter: Iter([Int32(1), Int8(4), Int64(8)]) })\ | ||
| "Projection: a IN ([CAST(Int32(1) AS Int64), CAST(Int8(4) AS Int64), Int64(8)]) AS a IN (Map { iter: Iter([Literal(Int32(1)), Literal(Int8(4)), Literal(Int64(8))]) })\ | ||
| \n EmptyRelation"; |
There was a problem hiding this comment.
I think this test case should not change, but current I failed to past this test case.
When I change the code 0ef94 to use Display I got failed by Projection: a IN ([CAST(Int32(1) AS Int64), CAST(Int8(4) AS Int64), Int64(8)]) missing Alias.
I current could not find a good way to solve it.
There was a problem hiding this comment.
AS a IN (Map { iter: Iter([Int32(1), Int8(4), Int64(8)]) })\ is missing,I debug find it's a alias.
| top_join_plan.as_str(), | ||
| join_plan.as_str(), | ||
| "RepartitionExec: partitioning=Hash([Column { name: \"a\", index: 0 }], 10), input_partitions=1", | ||
| "RepartitionExec: partitioning=Hash([a@0], 10), input_partitions=1", |
There was a problem hiding this comment.
this certainly looks nicer 👍
| /// } | ||
| /// ``` | ||
| #[derive(Clone, PartialEq, Eq, Hash)] | ||
| #[derive(Clone, PartialEq, Eq, Hash, Debug)] |
| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
| write!(f, "{self:?}") | ||
| } | ||
| #[macro_export] |
There was a problem hiding this comment.
Given how common this functionality is I wonder if we could move this macro (or maybe make a function as I don't see any benefit in making it a macro) in datafusion_util and use it more around the codebase.
Just a thought
There was a problem hiding this comment.
I think making a function and moving to datafusin_util is a good option.
There was a problem hiding this comment.
I can give it a try maybe after this PR is merged
There was a problem hiding this comment.
I tried #6739 -- it isn't great -- any thoughts appreciated
|
Hello @alamb , I would like to pass all tests in my local machine, but got some error. When I run command ProductName: macOS |
That looks like you either have to increase your ulimit to increase the number of open files, or perhaps you can reduce the parallelism of the tests: $ cargo test -- --test-threads=1 |
| ------------AggregateExec: mode=Partial, gby=[cntrycode@0 as cntrycode], aggr=[COUNT(UInt8(1)), SUM(custsale.c_acctbal)] | ||
| --------------ProjectionExec: expr=[substr(c_phone@0, 1, 2) as cntrycode, c_acctbal@1 as c_acctbal] | ||
| ----------------NestedLoopJoinExec: join_type=Inner, filter=BinaryExpr { left: CastExpr { expr: Column { name: "c_acctbal", index: 0 }, cast_type: Decimal128(19, 6), cast_options: CastOptions { safe: false, format_options: FormatOptions { safe: true, null: "", date_format: None, datetime_format: None, timestamp_format: None, timestamp_tz_format: None, time_format: None } } }, op: Gt, right: Column { name: "AVG(customer.c_acctbal)", index: 1 } } | ||
| ----------------NestedLoopJoinExec: join_type=Inner, filter=CAST(c_acctbal@0 AS Decimal128(19, 6)) > AVG(customer.c_acctbal)@1 |
| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | ||
| write!(f, "{self:?}") | ||
| } | ||
| #[macro_export] |
There was a problem hiding this comment.
I can give it a try maybe after this PR is merged
Which issue does this PR close?
Closes #6677
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?